package top.aicats.pattern.singleton.lazySingleton;


import java.util.ArrayList;
import java.util.List;

public class LazySingtonTest {
    public static void main(String[] args) {
        List<Thread> listThread = new ArrayList<Thread>();

        for (int i = 0; i  < 2; i++) {
            Thread thread = new Thread(new Runnable() {
                public void run() {
                    LazySingleton lazySingleton = LazySingleton.getInstance();
                    lazySingleton.testPrint();
                }
            });
           listThread.add(thread);
        }
        for (int i = 0; i < 2; i++)
        {
            listThread.get(i).start();
        }

    }
}
